package cn.javastudy.design._2_结构型模式._装饰器模式;

import cn.javastudy.design._2_结构型模式._装饰器模式.被装饰的类.FastFood;
import cn.javastudy.design._2_结构型模式._装饰器模式.被装饰的类.FriedRice;
import cn.javastudy.design._2_结构型模式._装饰器模式.装饰类.Bacon;
import cn.javastudy.design._2_结构型模式._装饰器模式.装饰类.Egg;
import cn.javastudy.design._2_结构型模式._装饰器模式.装饰类.Garnish;

/**
 * 客户
 *
 * @author sumou
 * @date 2025/01/24
 */
public class Client {

    public static void main(String[] args) {
        FastFood rice = new FriedRice();
        System.out.println(rice.getDesc() + "   " + rice.count() + "元");

        rice = new Egg(rice);
        System.out.println(rice.getDesc() + "   " + rice.count() + "元");

        rice = new Egg(rice);
        System.out.println(rice.getDesc() + "   " + rice.count() + "元");

    }

}
